<?php
// 本类由系统自动生成，仅供测试用途
class DailyAction extends CommonAction {
	
	public function _filter(&$map)
	{
		$content=$_REQUEST['content'];
		if(!empty ($content))
		{
			$map['content'] = array('like',"%".$content."%");
		
		}
		$this->assign('content',$content);
		$userid=$_SESSION[C('USER_AUTH_KEY')];
		$map['userid']=$userid;
	}
	public function _before_index() {
		$model = M ( "Daily" );
		$list = $model->getField ( 'id,time,type,content,userid' );
		$this->assign ( 'groupList', $list );
	}
	public function _before_add() {
		$model = M ( "Daily" );
		$list = $model->select ();
		$this->assign ( 'list', $list );
	}
	public function _before_edit() {
		$model = M ( "Daily" );
		$list = $model->select ();
		$this->assign ( 'list', $list );
	}
}